package com.chapter11.chap_exercise.Test07;

class Car {
    private  double temperature;

    public Car(double temperature) {
        this.temperature = temperature;
    }

    class Air{
        public String flow(){
            return  "Air blow";
        }

        public void monitor(){
            if(temperature > 40.0){
                System.out.println(flow() + " cold wind");
            } else if(Car.this.temperature < 0){
                System.out.println(flow() + " warm wind");
            } else {
                System.out.println("shut down");
            }
        }
    }

    public Air air(){
        return new Air();
    }

}

